#!/bin/bash
npm run build
rm -rf dist.tar.gz
ssh root@zhangjianyong.top "rm -rf /usr/share/nginx/dist.tar.gz"
ssh root@zhangjianyong.top "rm -rf /usr/share/nginx/tools"
tar --no-xattrs -zcvf dist.tar.gz dist/
scp dist.tar.gz root@zhangjianyong.top:/usr/share/nginx/
ssh root@zhangjianyong.top "tar -zxvf /usr/share/nginx/dist.tar.gz -C /usr/share/nginx/ && mv /usr/share/nginx/dist /usr/share/nginx/tools"
#rm -rf tools && mv dist tools

